﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Layouts/Monoblock.Master" AutoEventWireup="true" CodeBehind="Details.aspx.cs" Inherits="ScrumBox.Web.Views.Project.Details" %>
<%@ Import Namespace="ScrumBox.Web.Controllers"%>
<%@ Import Namespace="MvcContrib"%>
<%@ Import Namespace="ScrumBox.Model"%>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%  var project = ViewData.Get<Project>(); %>
    
    <h2 class="title"><%= project.Name %></h2>
	<p class="meta">Last Edited by <a href="#">mick</a> on June 13, 2008 </p>
    <div class="entry">
        <fieldset>
            <legend>Details</legend>
                <%= Html.RenderUserControl("~/Views/Project/ProjectView.ascx") %>
        </fieldset>

        <br />
        <fieldset>
            <legend>Product Backlog</legend>
            <table id="productBackLog" cellspacing="0">
                <tr>
                    <th>Title</th>
                    <th>Description</th>
                </tr>
                <% if (project.GetProductBacklogItems().Count > 0){ %>
                <% foreach (var productBackLogItem in project.GetProductBacklogItems())
                   { %>
                <tr>
                    <td><%= productBackLogItem.Title%></td>
                    <td align="right">
                        <%var productBackLogItemCopy = productBackLogItem;%>
                        <%= Html.ActionLink<ProductBackLogController>(c => c.Edit(project.Key, productBackLogItemCopy.Title), "View")%>
                    </td>
                </tr>
                <% } %>
                <% } %>
            </table>   
            <div class="button-row">
                <%= Html.ActionLink<ProductBackLogController>(c => c.New(project.Key), "Add a new product backlog item")%>
            </div> 
        </fieldset>

        <br />
        <fieldset>
            <legend>Sprints</legend>
            <table id="sprints" cellspacing="0">
                <tr>
                    <th>Description</th>
                    <th></th>
                </tr>
                <% if (project.GetSprints().Count > 0){ %>
                <% foreach (var sprint in project.GetSprints())
                   { %>
                <tr>
                    <td><%= sprint.Title %></td>
                    <td align="right">
                        <%var sprintCopy = sprint;%>
                        <%= Html.ActionLink<SprintController>(c => c.Details(sprintCopy.Key), "View")%>
                    </td>
                </tr>
                <% } %>
                <% } %>
            </table>   
            <div class="button-row">
                <%= Html.ActionLink<SprintController>(c => c.New(project.Key), "Add a new sprint")%>
            </div>                
        </fieldset>
    </div>
</asp:Content>
